#include <QtCore>
#include <QtNetwork>
#include <QCoreApplication>
#include "HttpAuthDaemon.h"

int main( int argc, char * argv[] ) {
  Server_Application a( argc, argv );
  SingleApplication instance(a.serverName(),&a);
  if (instance.isRunning()) {
      qDebug() << "Instance is running check arguments to set.....";
      instance.sendMessage(a.commands());
      return 0;
  }
  a.start();
  QObject::connect(&instance, SIGNAL(messageReceived(const QString&)),
						 &a, SLOT(handleCommands(const QString&)));
  return a.exec();
}


